package com.jams.goodox.entity;

import com.jams.goodox.utils.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ServerOrderInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    private String acceptTime; //外赠单领取时间
    /**
     * appraiseAgain : 1
     * appraiseContent : 测试内容y7c4
     * appraiseQuality : 74882
     * appraiseSpeed : 1
     */

    private AssessInfo appraise;
    private int closeType;//关闭类型（0 未关闭 1 超时未支付关闭 2 业主取消订单 3 处理关单4外赠超时5售后关单）
    private String communityId;//园区id
    private String discountNum;//订单抵价券使用数量
    private String feedOrderTag;
    private String freightMoney;//运费
    private int hasAfterSalesLog;//是否有售后(0无1有)
    private String hasLogistics;//是否有物流(0无1有)
    private String iconUrl;//服务图标url
    private String id;//	订单id
    private int isAfterSales;//	是否可申请售后(0可，1否)
    private int isAftersalesIng;//是否正在售后中 0否 1是
    private int isPay;//是否已经支付（0未支付，1已经支付）
    private String itemRemark;//订单信息（表单服务订单取订单备注，有商品的订单取商品信息）
    private String moneyType;//	支付方式（1支付宝、2银联、3微信、4招行一网通、10充值卡）
    private String orderDate;//预约日期
    private String orderMoney;//订单应付金额
    private String orderMoneyDiscount;//折扣金额
    private String orderMoneyExpenses;//快递金额
    private String orderMoneyReal;//	实收金额
    private String orderMoneyTotal;//订单总金额
    private String orderNumber;//	订单附加信息（维修服务 1为居家 2为公共, 1投诉2表扬3建议4咨询）
    private String orderRemark;//订单备注
    private String orderStatus;//	订单状态（不传表示全部，0待付款，6待处理，2处理中，3待评价）
    private String orderTime;//预约时间段
    private String payRemainingTime;//剩余支付时间(分钟)
    private String payRemainingTimeStr;//剩余时间
    private String redPacketId;//红包id
    private String redPacketTypeName;//	红包类型（通用红包，定向红包）
    private String referTime;//下单时间
    private String serialNumber;//订单编号
    private String storePhone;//门店客服电话
    private String subIsOnlinepay;//	支付方式（1.线下支付,2.线上支付3.线上支付and线下支付）
    private String subjectCode;//服务代码
    private String subjectId;//公共服务id
    private String subjectName;//	园区服务名称
    private String userAddress;//收货地址
    private String userId;//业主id
    private String userName;//	收货人姓名
    private String userPhone;//收货人手机号

    private String discountPercent;

    private String orderCreateClassfiy;//1个人订单 2企业订单
    private String enterpriseAddress;
    private String enterpriseHouseId;
    private String enterpriseId;
    private String createUserMobile;//企业订单操作人电话
    private String invoiceTitle;//发票抬头

    public String getInvoiceTitle() {
        return invoiceTitle;
    }

    public void setInvoiceTitle(String invoiceTitle) {
        this.invoiceTitle = invoiceTitle;
    }

    public String getInvoiceType() {
        if(invoiceType == null){
            return "-1";
        }
        return invoiceType;
    }

    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    private String invoiceType;//0不开票 1 普通发票 2 专用发票

    public String getCreateUserMobile() {
        return createUserMobile;
    }

    public void setCreateUserMobile(String createUserMobile) {
        this.createUserMobile = createUserMobile;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    private String createUserName;//企业订单操作人姓名

    public String getEnterpriseAddress() {
        return enterpriseAddress;
    }

    public void setEnterpriseAddress(String enterpriseAddress) {
        this.enterpriseAddress = enterpriseAddress;
    }

    public String getEnterpriseHouseId() {
        return enterpriseHouseId;
    }

    public void setEnterpriseHouseId(String enterpriseHouseId) {
        this.enterpriseHouseId = enterpriseHouseId;
    }

    public String getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(String enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    private String enterpriseName;

    public double getOnlinePayDiscount() {
        if (null == discountPercent)
            return 10.0;
        double d;
        try {
            d = Double.parseDouble(discountPercent);
        } catch (NumberFormatException e) {
            d = 10.0;
        }
        return d;
    }

    public double getOnlinePayDiscountNum() {
        return getOnlinePayDiscount() * 0.1;
    }

    public String getOnlinePayDiscountString() {
        return discountPercent;
    }

    public void setOnlinePayDiscount(String onlinePayDiscount) {
        this.discountPercent = onlinePayDiscount;
    }


    /**
     * Id : acdeda37-5d09-11e6-b312-ecf4bbbf7d00
     * itemNum : 1
     * itemPrice : 0.01
     * pic : http://121.40.102.80:7080///img/201512/sub/sub144920055774378.png
     * producName : 大黄鱼
     * productUnit : 元/斤
     * serviceStatus : 0
     */

    private List<MyOrderInfo> orderItem;
    private ArrayList<Integer> payType;
    /**
     * id : 245dbeda-3aaf-11e6-bb37-008cfae40fdc
     * intime : 2016-06-25 16:30:58
     * name : /img/201606/order/order146684345832778.jpg
     * refID : 24283341-3aaf-11e6-bb37-008cfae40fdc
     * type : 2
     */
    private List<AnnexBean> picList;
    private int grantTimeoutStatus; //0未超时  1超时未领取 2超时未填写地址
    private String accepterNickname;
    private String servicePhoneNumber;
    private String givingStatus;
    private String communityName;
    private String startDealTime;// 开始处理时间
    private String lastTimeDur;
    private String inceptTimeHour;
    private String orderFeedback;
    private String inceptTime;
    private String priceTicket;
    private String order_onlinepay_type;

//    private AssessInfo assessInfo;

    private String typeLabel;

    private String sectionType;//1线上购物；2上门服务；3在线预订；4业主自治；5好氧物管

    public int getGrantTimeoutStatus() {
        return grantTimeoutStatus;
    }

    public void setGrantTimeoutStatus(int grantTimeoutStatus) {
        this.grantTimeoutStatus = grantTimeoutStatus;
    }

    public String getAccepterNickname() {
        return accepterNickname;
    }

    public void setAccepterNickname(String accepterNickname) {
        this.accepterNickname = accepterNickname;
    }

    public String getServicePhoneNumber() {
        return servicePhoneNumber;
    }

    public void setServicePhoneNumber(String servicePhoneNumber) {
        this.servicePhoneNumber = servicePhoneNumber;
    }

    public String getGivingStatus() {
        return givingStatus;
    }

    public void setGivingStatus(String givingStatus) {
        this.givingStatus = givingStatus;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getStartDealTime() {
        return startDealTime;
    }

    public void setStartDealTime(String startDealTime) {
        this.startDealTime = startDealTime;
    }

    public String getLastTimeDur() {
        return lastTimeDur;
    }

    public void setLastTimeDur(String lastTimeDur) {
        this.lastTimeDur = lastTimeDur;
    }

    public String getInceptTimeHour() {
        return inceptTimeHour;
    }

    public void setInceptTimeHour(String inceptTimeHour) {
        this.inceptTimeHour = inceptTimeHour;
    }

    public String getOrderFeedback() {
        return orderFeedback;
    }

    public void setOrderFeedback(String orderFeedback) {
        this.orderFeedback = orderFeedback;
    }

    public String getInceptTime() {
        return inceptTime;
    }

    public void setInceptTime(String inceptTime) {
        this.inceptTime = inceptTime;
    }

    public String getPriceTicket() {
        return priceTicket;
    }

    public void setPriceTicket(String priceTicket) {
        this.priceTicket = priceTicket;
    }

    public String getOrder_onlinepay_type() {
        return order_onlinepay_type;
    }

    public void setOrder_onlinepay_type(String order_onlinepay_type) {
        this.order_onlinepay_type = order_onlinepay_type;
    }

    public String getAcceptTime() {
        return acceptTime;
    }

    public void setAcceptTime(String acceptTime) {
        this.acceptTime = acceptTime;
    }

    public AssessInfo getAppraise() {
        return appraise;
    }

    public void setAppraise(AssessInfo appraise) {
        this.appraise = appraise;
    }

    public int getCloseType() {
        return closeType;
    }

    public void setCloseType(int closeType) {
        this.closeType = closeType;
    }

    public String getCommunityId() {
        return communityId;
    }

    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }

    public String getDiscountNum() {
        return discountNum;
    }

    public void setDiscountNum(String discountNum) {
        this.discountNum = discountNum;
    }

    public String getFeedOrderTag() {
        return feedOrderTag;
    }

    public void setFeedOrderTag(String feedOrderTag) {
        this.feedOrderTag = feedOrderTag;
    }

    public String getFreightMoney() {
        return freightMoney;
    }

    public void setFreightMoney(String freightMoney) {
        this.freightMoney = freightMoney;
    }

    public int getHasAfterSalesLog() {
        return hasAfterSalesLog;
    }

    public void setHasAfterSalesLog(int hasAfterSalesLog) {
        this.hasAfterSalesLog = hasAfterSalesLog;
    }

    public int getHasLogistics() {
        return StringUtils.toInt(hasLogistics, -1);
    }

    public void setHasLogistics(String hasLogistics) {
        this.hasLogistics = hasLogistics;
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getIsAfterSales() {
        return isAfterSales;
    }

    public void setIsAfterSales(int isAfterSales) {
        this.isAfterSales = isAfterSales;
    }

    public int getIsAftersalesIng() {
        return isAftersalesIng;
    }

    public void setIsAftersalesIng(int isAftersalesIng) {
        this.isAftersalesIng = isAftersalesIng;
    }

    public int getIsPay() {
        return isPay;
    }

    public void setIsPay(int isPay) {
        this.isPay = isPay;
    }

    public String getItemRemark() {
        return itemRemark;
    }

    public void setItemRemark(String itemRemark) {
        this.itemRemark = itemRemark;
    }

    public String getMoneyType() {
        return moneyType;
    }

    public void setMoneyType(String moneyType) {
        this.moneyType = moneyType;
    }

    public String getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }

    public String getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(String orderMoney) {
        this.orderMoney = orderMoney;
    }

    public String getOrderMoneyDiscount() {
        return orderMoneyDiscount;
    }

    public void setOrderMoneyDiscount(String orderMoneyDiscount) {
        this.orderMoneyDiscount = orderMoneyDiscount;
    }

    public String getOrderMoneyExpenses() {
        return orderMoneyExpenses;
    }

    public void setOrderMoneyExpenses(String orderMoneyExpenses) {
        this.orderMoneyExpenses = orderMoneyExpenses;
    }

    public String getOrderMoneyReal() {
        return orderMoneyReal;
    }

    public void setOrderMoneyReal(String orderMoneyReal) {
        this.orderMoneyReal = orderMoneyReal;
    }

    public String getOrderMoneyTotal() {
        return orderMoneyTotal;
    }

    public void setOrderMoneyTotal(String orderMoneyTotal) {
        this.orderMoneyTotal = orderMoneyTotal;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderRemark() {
        return orderRemark;
    }

    public void setOrderRemark(String orderRemark) {
        this.orderRemark = orderRemark;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public String getPayRemainingTimeStr() {
        return payRemainingTimeStr;
    }

    public void setPayRemainingTimeStr(String payRemainingTimeStr) {
        this.payRemainingTimeStr = payRemainingTimeStr;
    }
    public String getPayRemainingTime() {
        return payRemainingTime;
    }

    public void setPayRemainingTime(String payRemainingTime) {
        this.payRemainingTime = payRemainingTime;
    }
    public String getRedPacketId() {
        return redPacketId;
    }

    public void setRedPacketId(String redPacketId) {
        this.redPacketId = redPacketId;
    }

    public String getRedPacketTypeName() {
        return redPacketTypeName;
    }

    public void setRedPacketTypeName(String redPacketTypeName) {
        this.redPacketTypeName = redPacketTypeName;
    }

    public String getReferTime() {
        return referTime;
    }

    public void setReferTime(String referTime) {
        this.referTime = referTime;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getStorePhone() {
        return storePhone;
    }

    public void setStorePhone(String storePhone) {
        this.storePhone = storePhone;
    }

    public String getSubIsOnlinepay() {
        return subIsOnlinepay;
    }

    public void setSubIsOnlinepay(String subIsOnlinepay) {
        this.subIsOnlinepay = subIsOnlinepay;
    }

    public String getSubjectCode() {
        if(subjectCode == null){
            return "";
        }
        return subjectCode;
    }

    public void setSubjectCode(String subjectCode) {
        this.subjectCode = subjectCode;
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public List<MyOrderInfo> getOrderItem() {
        return orderItem;
    }

    public void setOrderItem(List<MyOrderInfo> orderItem) {
        this.orderItem = orderItem;
    }

    public ArrayList<Integer> getPayType() {
        return payType;
    }

    public void setPayType(ArrayList<Integer> payType) {
        this.payType = payType;
    }

    public List<AnnexBean> getPicList() {
        return picList;
    }

    public void setPicList(List<AnnexBean> picList) {
        this.picList = picList;
    }

    public AssessInfo getAssessInfo() {
        return appraise;
    }

    public void setAssessInfo(AssessInfo appraise) {
        this.appraise = appraise;
    }

    public String getTypeLabel() {
        if (typeLabel == null) {
            return "";
        }
        return typeLabel;
    }

    public void setTypeLabel(String typeLabel) {
        this.typeLabel = typeLabel;
    }

    public int getSectionType() {
        return StringUtils.toInt(sectionType, 1);
    }

    public void setSectionType(String sectionType) {
        this.sectionType = sectionType;
    }

    public String getOrderCreateClassfiy() {
        if(orderCreateClassfiy == null){
            return "1";
        }
        return orderCreateClassfiy;
    }

    public void setOrderCreateClassfiy(String orderCreateClassfiy) {
        this.orderCreateClassfiy = orderCreateClassfiy;
    }
}
